package rank

type rankInstance struct {
	adapt  adapt
	prefix string
	asc    bool
}

func (instance *rankInstance) Update(key string, value int) error {
	return instance.adapt.Update(instance.prefix, key, value)
}
func (instance *rankInstance) Score(key string) int {
	return instance.adapt.Score(instance.prefix, key)
}
func (instance *rankInstance) Count() int {
	return instance.adapt.Count(instance.prefix)
}
func (instance *rankInstance) Rank(key string) int {
	return instance.adapt.Rank(instance.prefix, key, instance.asc)
}
func (instance *rankInstance) Top(number int) []Position {
	return instance.adapt.Top(instance.prefix, number, instance.asc)
}
func (instance *rankInstance) Range(start int, end int, number int) []Position {
	return instance.adapt.Range(instance.prefix, start, end, number, instance.asc)
}
